package org.springframework.beans.factory.config;


import java.util.Objects;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/12/14
 */
public class BeanDefinitionHolder {
    private String beanName;
    private BeanDefinition bd;

    public BeanDefinitionHolder(String beanName,BeanDefinition bd){
        Objects.requireNonNull(beanName,"BeanDefinitionHolder beanName must not be null");
        Objects.requireNonNull(beanName,"BeanDefinitionHolder bd must not be null");
        this.beanName = beanName;
        this.bd = bd;
    }

    public BeanDefinitionHolder(BeanDefinitionHolder holder){
        Objects.requireNonNull(holder,"BeanDefinitionHolder holder must not be null");
        this.beanName = holder.getBeanName();
        this.bd = holder.getBeanDefinition();
    }

    public String getBeanName() {
        return beanName;
    }


    public BeanDefinition getBeanDefinition() {
        return bd;
    }

}
